/**
 * @author ZyElite
 * @time 2022-07-27
 */

#ifndef XLOG_H
#define XLOG_H

#ifdef __cplusplus
extern "C" {
#endif

enum Level {
    ERROR = 1,
    WARN = 2,
    DEBUG = 3,
    INFO = 4,
    VERBOSE=5
};

void xlog(const char *filename, int line, enum Level level, const char *fmt, ...) __attribute__((format(printf, 4, 5)));

#define Log(level, format, ...) xlog(__FILE__, __LINE__, level, format, ## __VA_ARGS__)

#ifdef __cplusplus
};
#endif

#endif //STREAM_XLOG_H

